<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        img {
            width: 300px;
        }
    </style>
</head>

<body>
    <form action="http://localhost:3000/register" method="post">
        <input type="text" name="username" placeholder="请输入账号"><br>
        <input type="text" name="password" placeholder="请输入密码"><br>
        <input type="text" placeholder="请输入验证码">
        <img src="http://localhost:3000/getyzm" alt="" id="oimg">
        <a href="javascript:;" id="oa">看不清？换一张</a>
        <button>注册</button>
    </form>
</body>

</html>
<script>

    oa.onclick = function () {

        // 希望src 有变化，但是任然是这个路由 --》/getyzm
        oimg.src="http://localhost:3000/getyzm?"+Math.random()
    }




</script>